<?php

namespace Payment\Common\SwThree\Data;


/**
 * Class BackBarChargeData
 *
 * 刷卡（条码）支付，数据回调处理
 *
 * @package Payment\Common\Sw\Data
 *
 */
class BackBarChargeData extends SwBaseData
{

    public function getData()
    {

        $this->retData['package'] = [
            'channel_trade_no' => $this->channel_trade_no??'',//通道订单号，微信订单号、支付宝订单号等，返回时不参与签名
            'channel_order_no' => $this->channel_order_no??'',//银行渠道订单号，微信支付时显示在支付成功页面的条码，可用作扫码查询和扫码退款时匹配
            'user_id'   => $this->user_id,//付款方用户id，“微信openid”、“支付宝账户”、“qq号”等，返回时不参与签名
        ];
        $this->retData['other'] = [
            'pay_type' => $this->pay_type,//010微信，020 支付宝，060qq钱包，080京东钱包，090口碑，100翼支付，110银联二维码
            'merchant_name' => $this->merchant_name,
            'merchant_no' => $this->merchant_no,
            'terminal_id' => $this->terminal_id,
            'terminal_trace'=> $this->terminal_trace,
            'terminal_time' => $this->terminal_time,
            'total_fee' => $this->total_fee,
            'end_time' => $this->end_time??'',//支付完成时间，yyyyMMddHHmmss，全局统一时间格式
            'out_trade_no' => $this->out_trade_no,
            'attach'   => $this->attach??'',//附加数据,原样返回
        ];

        if($this->pay_type == '090'){//口碑实收金额，pay_type为090时必填
            $this->retData['package']['receipt_fee'] = $this->receipt_fee;
        }

        return parent::getData(); // TODO: Change the autogenerated stub
    }

    protected function buildData(){

    }

    protected function checkDataParam()
    {
        // 对于返回数据不做检查检查
    }
}
